//
//  MyBillCell.m
//  saler-ios
//
//  Created by 王亚陆 on 17/6/12.
//  Copyright © 2017年 sayimba. All rights reserved.
//

#import "MyBillCell.h"

@implementation MyBillCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self){
        
        
        self.contentView.backgroundColor = WhiteColor;
        
        self.begainAdd = [UILabel createUIlabel:@"广州" andFont:FontOfSize13 andColor:TitleColor];
        [self.contentView addSubview:self.begainAdd];
        [self.begainAdd mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.contentView.mas_top).with.offset(15*kHeight);
            make.left.mas_equalTo(self.contentView.mas_left).with.offset(20*kWidth);
        }];
        
        UIView * line = [[UIView alloc]init];
        line.backgroundColor = TitleColor;
        [self.contentView addSubview:line];
        [line mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.begainAdd.mas_centerY);
            make.left.mas_equalTo(self.begainAdd.mas_right);
            make.size.mas_equalTo(CGSizeMake(25*kWidth, 2*kHeight));
        }];

        self.endAdd = [UILabel createUIlabel:@"四川·璧山" andFont:FontOfSize13 andColor:TitleColor];
        [self.contentView addSubview:self.endAdd];
        [self.endAdd mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.begainAdd.mas_centerY);
            make.left.mas_equalTo(line.mas_right);
        }];

        
        self.timeLabel = [UILabel createUIlabel:@"2017-10-10 10:00:00" andFont:FontOfSize10 andColor:PriceLabelColor];
        [self.contentView addSubview:self.timeLabel];
        [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.begainAdd.mas_bottom).with.offset(8*kHeight);
            make.left.mas_equalTo(self.contentView.mas_left).with.offset(20*kWidth);
        }];

        self.numberLabel =[UILabel createUIlabel:@"5辆" andFont:FontOfSize13 andColor:TitleColor];
        [self.contentView addSubview:self.numberLabel];
        [self.numberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self.contentView.mas_centerX);
            make.centerY.mas_equalTo(self.contentView.mas_centerY);
        }];

        self.priceLabel = [UILabel createUIlabel:@"+50" andFont:FontOfSize13 andColor:YellowColor];
        [self.contentView addSubview:self.priceLabel];
        [self.priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.mas_equalTo(self.contentView.mas_centerY);
            make.right.mas_equalTo(self.contentView.mas_right).with.offset(-20*kWidth);
        }];

        
        UIView * Hline1 =[[UIView alloc]init];
        Hline1.backgroundColor = GrayColor;
        [self.contentView addSubview:Hline1];
        [Hline1 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.contentView.mas_left).with.offset(20*kWidth);
            make.bottom.mas_equalTo(self.contentView.mas_bottom).with.offset(0.5*kHeight);
            make.size.mas_equalTo(CGSizeMake(336*kWidth, 1*kHeight));
        }];


        



        

        
        
        
    }
    return self;
    
}




- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
